feat: Basic functionality for serving apis#4
Merged
Conversation
feat: Adds settings to module fix: Corrects gemname in publish-gem.sh
OpenSourceAlchemist
previously approved these changes
Jul 29, 2025
BryceARich
reviewed
Jul 29, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the NatsApiServer module for Rubyists::Leopard, providing a framework for building concurrent NATS Service API workers with middleware support and declarative endpoint definitions.
- Adds core infrastructure including settings, error classes, and message wrapper functionality
- Implements NatsApiServer module with endpoint registration, middleware chain, and concurrent worker management
- Provides comprehensive test coverage for all new components
Reviewed Changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/leopard.rb | Main entry point with Pathname extension and SemanticLogger setup |
| lib/leopard/settings.rb | Configuration module using Dry::Configurable for libroot, root, and logger settings |
| lib/leopard/errors.rb | Base error classes for the framework |
| lib/leopard/message_wrapper.rb | JSON-aware wrapper for NATS messages with response helpers |
| lib/leopard/nats_api_server.rb | Core server module with endpoint registration, middleware support, and worker management |
| test/ | Comprehensive test suite covering all new functionality |
| examples/echo_endpoint.rb | Simple usage example demonstrating endpoint definition |
| Gemfile | Groups development/test dependencies |
| Readme.adoc | Complete documentation with usage examples |
BryceARich
reviewed
Jul 31, 2025
BryceARich
approved these changes
Jul 31, 2025
This was referenced Jul 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the NatsApiServer module, which provides a
basic API server with a message wrapper that runs
the message through middleware chain.